package com.weng.sso.core.config;

/*
 *  统一认证配置
 * @author wengzhonghui
 * @date 15:02 2019/4/15
 */
public class SsoConfig {

    public final static String TOKEN_PARAM_NAME = "x-access-token";

    /**
     *  超时时长(s)
     */
    public static final int SSO_EXPIRE_TIME_LONG_WEB = 3600;

    /**
     * sso sessionid, between browser and sso-server (web + token client)
     */
    public static final String SSO_SESSIONID = "sso_session_id";


    /**
     * redirect url (web client)
     */
    public static final String REDIRECT_URL = "redirect_url";

    /**
     * sso user, request attribute (web client)
     */
    public static final String SSO_USER = "sso_user";


    /**
     * sso server address (web + token client)
     */
    public static final String SSO_SERVER = "sso_server";

    /**
     * login url
     */
    public static final String SSO_LOGIN = "/login";
    /**
     * logout url,
     */
    public static final String SSO_LOGOUT = "/logout";

    /*
     * 登录检查
     */
    public static final String SSO_LOGIN_CHECK = "/login-check";

    /*
     * 获取当前用户基础信息
     */
    public static final String SSO_USER_INFO = "/user-info";


    /*
     * 获取当前用户基础信息
     */
    public static final String SSO_CHANGE_PWD = "/change-pwd";

    /**
     * logout path, client relatice path
     */
    public static final String SSO_LOGOUT_PATH = "SSO_LOGOUT_PATH";

    /**
     * excluded paths, client relatice path, include path can be set by "filter-mapping"
     */
    public static final String SSO_EXCLUDED_PATHS = "SSO_EXCLUDED_PATHS";

    /*
     * 超时时长(S)
     */
    public static final int SSO_EXPIRE_TIME_LONG = 3600*2;


    public static final String HEADER_APP_ID = "appId";
    public static final String HEADER_TIMESTAMP = "timestamp";
    public static final String HEADER_SIGN = "sign";

}
